package og.jaaksi.test.gridview;

import android.app.Activity;
import android.os.Bundle;
import android.widget.GridView;

import java.util.ArrayList;

public class MyActivity extends Activity
{
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		GridView grid_tag = (GridView) findViewById(R.id.grid_tag);
		GridAdapter tagAdapter = new GridAdapter(this, 0);
		GridAdapter galleryAdapter = new GridAdapter(this, 1);

		ArrayList<Integer> list = new ArrayList<>();
		for (int i = 0; i < 9; i++)
		{
			list.add(i);
		}
		tagAdapter.setDatas(list);
		galleryAdapter.setDatas(list);

		grid_tag.setAdapter(tagAdapter);
		GridView grid_gallery = (GridView) findViewById(R.id.grid_gallery);
		grid_gallery.setAdapter(galleryAdapter);
	}
}
